package o;

import android.content.Context;
import androidx.annotation.NonNull;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.gamebox.plugin.gameservice.bean.GameInfo;
import o.bfw.a;

public class bfu {
    private Context ˊ;
    private GameInfo ˏ;
    private d ॱ;

    public interface d {
        void ॱ(boolean z);
    }

    public bfu(@NonNull Context context, @NonNull GameInfo gameInfo) {
        this.ˊ = context;
        this.ˏ = gameInfo;
    }

    public void ˏ(d dVar) {
        if (dVar != null) {
            if (this.ˊ == null || this.ˏ == null) {
                dVar.ॱ(false);
                return;
            }
            this.ॱ = dVar;
            if (UserSession.getInstance().isLoginSuccessful()) {
                ˏ();
                return;
            }
            eoj.ˋ().ˎ("BuoyRedChecker", new AccountBussinessListener(this) {
                final /* synthetic */ bfu ˎ;

                {
                    this.ˎ = r1;
                }

                public void onAccountBusinessResult(ccp o_ccp) {
                    this.ˎ.ˏ();
                    eoj.ˋ().ˊ("BuoyRedChecker");
                }
            });
            bfs.ˋ().ˎ(this.ˊ);
        }
    }

    private void ˏ() {
        new bfw().ˎ(this.ˏ, new a(this) {
            final /* synthetic */ bfu ˏ;

            {
                this.ˏ = r1;
            }

            public void ˊ(boolean z) {
                this.ˏ.ॱ.ॱ(z);
            }
        });
    }
}
